CXX=g++

CFLAGS=-Wall -w -g -I.

LDFLAGS=-rdynamic -ldl -lm -pthread #-lreadline -lgmpxx -lgmp

FILES=redlisp.cpp functions.cpp logic.cpp eval_parser.cpp core.cpp

TYPEFLAGS=-lm #-lgmpxx -lgmp

COREFILES=core/utility.cpp core/eval.cpp core/parser.cpp \
#core/functions.cpp

TYPEFILES=types/object.cpp types/rational.cpp types/symbol.cpp	\
types/string.cpp types/list.cpp types/error.cpp types/cfunction.cpp \
#types/number.cpp

all:
#	$(CXX) $(CFLAGS) -o test1 test1.cpp $(COREFILES) $(TYPEFILES)
#	$(CXX) $(CFLAGS) -o test2 test2.cpp $(COREFILES) $(TYPEFILES)
#	$(CXX) $(CFLAGS) -o test3 test3.cpp $(COREFILES) $(TYPEFILES)
	$(CXX) $(CFLAGS) -o ../redlisp redlisp.cpp $(COREFILES) $(TYPEFILES) $(LDFLAGS)

clean:
	rm *~ ../redlisp core/*~ types/*~

modules:
	make -C modules/
